package com.zcmob.web.admanagement.servlet;

import java.io.File;

import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.zcmob.web.admanagement.db.AppDao;
import com.zcmob.web.admanagement.util.FileUtils;
import com.zcmob.web.admanagement.util.PropsUtils;
import com.zcmob.web.admanagement.util.StringUtils;
import com.zcmob.web.admanagement.vo.AdUser;
import com.zcmob.web.admanagement.vo.AppBid;
import com.zcmob.web.admanagement.vo.AppInfo;
import com.zcmob.web.admanagement.vo.ServiceType;

public class UpdateStatusServlet extends ZcMobServlet {
    
    
    /**
     * 
     */
    private static final long serialVersionUID = 772102035256961275L;

    @Override
    protected void handle(HttpServletRequest req, HttpServletResponse response) {
        // TODO Auto-generated method stub
        try {
            String packagename = req.getParameter("packagename");
            String status = req.getParameter("status");
            
            AppInfo appinfo = new AppInfo();
            
            appinfo.setPackagename(packagename);
            appinfo.setStatus(status);
            
            boolean result = AppDao.getInstance().updateStatus(appinfo);
            
            RequestDispatcher rd = req.getRequestDispatcher("s_applist");
            rd.forward(req, response);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}
